/*
 * @Description: ��
 * @Author: hwh
 * @Date: 2024-09-25 19:07:27
 * @LastEditors: hwh
 * @LastEditTime: 2024-09-26 17:07:51
 */
import java.util.Arrays;
public class TestAction{
    public static void main(String[] args){
        //ͨ�������ڲ���ʵ�ֽӿ�
        Action action=new Action(){
            @Override
            public String[] test(String str){
                String [] array=str.split("\\|");
                
                // if (str.contains("|")){
                //     return str.split("\\|");
                // }else if (str.contains("-")){
                //     return str.split("-");
                // }
                return new String[] {str};
            }
            
    
        };
        String[] str1 = action.test("a|b|c");
        String[] str2 = action.test("a-b-c");
        System.out.println(Arrays.toString(str1));
        System.out.println(Arrays.toString(str2));   
}
}